<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="css/reset-2.css">
    <link rel="stylesheet" href="css/5.css">
    <link rel="stylesheet" href="css/swiper.min.css">
    <style>
         .swiper-container {
          width: 100%;
          height: 100%;
        }
        .swiper-slide {
          text-align: center;
          font-size: 18px;
          background: #fff;
    
          /* Center slide text vertically */
          display: -webkit-box;
          display: -ms-flexbox;
          display: -webkit-flex;
          display: flex;
          -webkit-box-pack: center;
          -ms-flex-pack: center;
          -webkit-justify-content: center;
          justify-content: center;
          -webkit-box-align: center;
          -ms-flex-align: center;
          -webkit-align-items: center;
          align-items: center;
        }
        .img-responsiive{display: block;}
        .swiper-pagination-fraction{
            width: auto;
			left: auto;
			right: 15px;
			padding: 3px 10px;
			font-size: .36rem;
			color: #fff;
			background: rgba(0,0,0,.3);
			border-radius: 10px;
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <div class="header">
                <i class="icon1 fl">&#xe622;</i>
                <h3 class="fl">合味道XO酱海鲜风味面</h3>
                <div class="fenxiang fl">
                    <i>&#xe86e;</i>
                </div>
            </div>
        </header>
        <section>
            <div class="ad">
                <!-- <img src="images/goods_1.jpg" alt=""> -->
                <div class="swiper-container">
                        <div class="swiper-wrapper">
                            <div class="swiper-slide"><img src="images/goods_1.jpg" alt="" class="img-responsiive"></div>
                            <div class="swiper-slide"><img src="images/goods_1.jpg" alt="" class="img-responsiive"></div>
                            <div class="swiper-slide"><img src="images/goods_1.jpg" alt="" class="img-responsiive"></div>
                        </div>
                        <!-- Add Pagination -->
                        <div class="swiper-pagination"></div>
                        <!-- Add Arrows -->
                        <!-- 箭头 -->
                        <!-- <div class="swiper-button-next"></div>
                        <div class="swiper-button-prev"></div> -->
                    </div>
            </div>
        </section>
        <section>
            <div class="menu">
                <div class="price">
                    <p class="a1">合味道XO酱海鲜风味面</p>
                    <p class="a2"><b><span class="a4">¥</span>5</b><span class="a3"><s>¥6</s></span></p>
                </div>
                <div class="price1">
                    <p>
                        <span class="b1">品</span>
                        <span class="b3">牌</span>
                        <span class="b2">日清</span>
                    </p>
                </div>
                <div class="price2">
                    <span class="c1">产品规格</span>
                    <span class="c2">87g</span>
                </div>
            </div>
        </section>
        <div class="gg">
            <img src="images/bg_03.png" alt="">
        </div>
        <div class="nav">
            <p class="d1 fl">添加商品：</p>
            <div class="yuan1 fl">
                <i class="jian" id="jian">&#xe608;</i>
            </div>
            <p class="fl poxs" id="shuliang">0</p>
            <div class="yuan2 fl">
                <i class="jia" id="jia">&#xe61c;</i>
            </div>
            <div class="gouwu">
                <img src="images/gga_03.png" alt="">
            </div>
        </div>
    </div>
   
    <script>
        var jian = document.getElementById('jian');
        var jia = document.getElementById('jia');
        
        var i = 1
        jian.onclick = function(){
            i--;
            var shuliang = document.getElementById('shuliang');
            shuliang.innerHTML = i;
             if(i<=0){
                i=1
             }
        }
        jia.onclick = function(){
            var shuliang = document.getElementById('shuliang');
            shuliang.innerHTML = i;
            i++;
            
        }
        
        // function zxc(){  //这是加的点击事件
        //     var asd = document.getElementById('asd').innerHTML;
        //     var jia = parseInt(asd) + 1;
        //     document.getElementById('asd').innerHTML = jia;
        // }
        // function qwe(){  //这是减的点击事件
        //     var asd = document.getElementById('asd').innerHTML;
        //     if(asd !=0 ){
        //         var jia = parseInt(asd) - 1;
        //         document.getElementById('asd').innerHTML = jia;
        //     }
        // }
        
    </script>
     <script src="js/swiper.min.js"></script>
     <!-- Initialize Swiper -->
     <script>
         var swiper = new Swiper('.swiper-container', {
             loop: true,
             autoplay: {
                 disableOnInteraction: false,
                 autoplay: true,
 
             },
 
             pagination: {
                 el: '.swiper-pagination',
                //  type: 'fraction',
             },
             navigation: {
                 nextEl: '.swiper-button-next',
                 prevEl: '.swiper-button-prev',
             },
         });
     </script>
</body>
</html>